from core.basehandler import BaseHandler
from core.room import Room
#from items.oilcan import OilCan
#from items.lamp import Lamp
from core.action import Action

class lobby(Room):
    def __init__(self, room_id):
        Room.__init__(self, room_id)    # do basic initialization for every room
        
        # add inventory items

        #self.add_item(Lamp())
        #self.add_item(OilCan())
        
        # build list of actions
        self.add_action(gpo)
        self.add_action(fcc)
        self.add_action(classroom)
        self.add_action(cornwalls)
        self.add_action(careerFair)
        self.add_action(victory_room)        
    
    # return description of room.
    def get_description(self):
        return "Welcome to SMG."
    
    # return image of room
    def get_image(self):
        return 'lobby.jpg'


class LobbyHandler(BaseHandler):
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return lobby 

# define actions for this room

class gpo(Action):
    def __init__(self):
        Action.__init__(self, "Out")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Go to the GPO"
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'gpo'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"


class fcc(Action):
    def __init__(self):
        Action.__init__(self, "FCC")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Go to the FCC"
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'fcc'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"
    

class classroom(Action):
    def __init__(self):
        Action.__init__(self, "Classroom")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Go to class"
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'classroom'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"


class cornwalls(Action):
    def __init__(self):
        Action.__init__(self, "Cornwalls")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Go to Cornwalls"
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'cornwalls'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"


class careerFair(Action):
    def __init__(self):
        Action.__init__(self, "CareerFair")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Go to the Career Fair"
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'career_fair'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"

    
class victory_room(Action):
    def __init__(self):
        Action.__init__(self, "Graduate ")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Graduate now!"
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'victory_room'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"

    